<!DOCTYPE html>
<html lang="en">
<head>
<title>huangliusong</title>
<script src="./vue.js"></script>
</head>
 
<body>
	<div id="root">
		<child>
			<h1 slot='header'>头部</h1>
			<h1 slot='footer'>尾部</h1>
		</child>
	</div>

	<script type="text/javascript">
	Vue.component('child',{
		template:'<div><slot name='header'></slot><p>hls</p><slot>默认内容</slot><slot name='footer'></div>'
	})
	var vm=new Vue({
		el:"#root"
	})
	</script>
</body>

</html>
